package com.cskaoyan.api.controll;


/*
        public static native void sleep(long millis)
         1. 在指定的毫秒数内让当前正在执行的线程休眠（暂停执行）
         2. millis - 以毫秒为单位的休眠时间。

 */
public class Demo1Sleep {

    public static void main(String[] args) {
        SleepThread sleepThread = new SleepThread();

        sleepThread.start();
    }
}

class SleepThread extends Thread {


    @Override
    public void run() {
        System.out.println("start");

        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("end");
    }
}
